
export const PARAMS_CONTRACT = [
    {
        type: "input",
        field: "name",
        title: "项目名称",
        value: "",
        props: {placeholder:"请输入项目名称"}
    },
   /*  {
        type: "select",
        field: "supplierId",
        title: "供应商",
        value: "",
        options:[],
        props: {placeholder:"请选择供应商"}
    }, */
    {
      type: "DatePicker",
      field: "time",
      title: "申请时间",
      value: [],
      props: {
        type: "daterange",
        format: "yyyy-MM-dd",
        "start-placeholder":"开始日期",
        "end-placeholder":"结束日期"
      }
    },
    {
      type:'el-button',
      field:'search',
      props:{
          type:'primary',
          icon:"el-icon-search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'el-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"el-icon-setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    }
  ]
  
  export let FORM_CONTRACT = [
    {
      type: "input",
      field: "payMoney",
      title: "付款金额",
      value: "",
      props: { type: "text"},
      validate: [
        { required: true, message: "请输入付款金额", trigger: "blur" },
        {
          validator: (rule, val, d) => {
            const reg = /^(?!0+(?:\.0+)?$)(?:[1-9]\d*|0)(?:\.\d{1,2})?$/
            val && !reg.test(val) ? d(true) : d()
          },message: '金额为正整数或者最多保留两位小数'
        }
      ]
    },
    {
      type: "input",
      field: "payName",
      title: "支付方式",
      value: "",
      props: { type: "text"},
      validate: [
        { required: true, message: "请输入支付方式", trigger: "blur" }
      ]
    }
  ]


export const LABEL_CONTRACT = [
  { label: "创建时间", prop: "createTime",width:'150',type:"createTime" },
  { label: "项目名称", prop: "name",width:'180',type:"normal"},
  { label: "供应商", prop:'supplierName',width:'120',type:"normal"},
  { label: "开始时间", prop:'startTime',width:'100',type:"openTime"},
  { label: "结束时间", prop:'endTime',width:'100',type:"openTime"},
  { label: "采购价", prop:'purchasePrice',width:'100',type:"normal"},
  { label: "中标价", prop:'winPrice',width:'100',type:"normal"},
  { label: "合同价",prop:'contractPrice',width:'100',type:"normal"},
  { label: "已付款", prop:'payMoney',width:'100',type:"normal"},
  { label: "合同状态",prop:'status',width:'100',type:"status"},
  { label: "付款方式", prop:'payName',width:'100',type:"normal"},
  { label: "创建人", prop: "createUserName",width:'100',type:"normal"},
  { label: "更新时间", prop: "updateTime",width:'150',type:"updateTime" }
]

export const OPTION_INLINE = {
  form: { labelWidth: "" ,inline: true,size:"small"},
  resetBtn: false,
  submitBtn: false
}
export const OPTION_BLOCK= {
  form: { labelWidth: "" ,size:"small"},
  row:{gutter: 20},
  resetBtn: false,
  submitBtn: false
}



